
// 基于template/src/views/{{appModules}}/{{pages@DEWFDYNAEDITVIEW3}}/{{spinalCase page.codeName}}-hook.ts.hbs生成
import { QXEvent } from 'qx-util';
import {
	WFDynaEditView3ActionType,
	WFDynaEditView3Controller,
	IWFDynaEditView3Ability,
	IWFDynaEditView3ControllerParams,
	IParam,
	IViewEvent,
} from '@/core';
import {
	useWFDynaEditView3Props,
	useWFDynaEditView3Basic,
	useWFDynaEditView3ControllerParams,
    useWFDynaEditView3Action,
} from '@/hooks/view/use-wfdyna-edit-view3';
import { model } from "./ibiz-sample-0021-usr-1114865995-wf-dyna-edit-view-3-model";

/**
 * 获取输入参数
 *
 * @export
 * @return {*}
 */
export function useProps() {
	return {
		...useWFDynaEditView3Props()
	};
}

/**
 * 获取基础数据
 *
 * @export
 * @param {*} props
 * @return {*}
 */
export function useBasic(props: any) {
	return {
		...useWFDynaEditView3Basic(model, props)
	};
}

/**
 * 获取行为
 *
 * @export
 */
export function useAction(controller: any) {
	return {
        ...useWFDynaEditView3Action(controller)
    }
}

/**
 * 获取控制器
 *
 * @export
 * @param {IParam} props
 * @param {QXEvent<IViewEvent<WFDynaEditView3ActionType, IWFDynaEditView3Ability>>} evt
 * @return {*}
 */
export function useController(
	props: IParam,
	evt: QXEvent<IViewEvent<WFDynaEditView3ActionType, IWFDynaEditView3Ability>>
) {
	const params: IWFDynaEditView3ControllerParams<
		WFDynaEditView3ActionType,
		IWFDynaEditView3Ability
	> = useWFDynaEditView3ControllerParams(model, props, evt);
	return new WFDynaEditView3Controller(params);
}